package main

import (
	"fmt"
	"log"
)

func init() {
	log.Println("init")
}
func main() {

	fmt.Println("学习go", "go")
	log.Println("go", "go")
	//声明变量
	var name string
	name = "go"
	println(name)
	fmt.Println(name)

	//类型推断
	var age = 20
	fmt.Println(age)

	// 短变量声明
	/**
	在函数内部声明
	*/
	nameStr := "study Go"
	fmt.Println(nameStr)
	nameAge, a := getNameAge()
	fmt.Println(nameAge, a)
}
func getNameAge() (name string, age int) {
	return "go", 2022
}
